package com.acme.bankapp.domain.bank;

import com.acme.bankapp.exception.bank.AccountOperationException;

/**
 * Interface representing account functionality
 *
 * @author Gregory Sobko
 *
 */
public interface Account {


    /**
     * Deposits money on account. Amount should be positive
     * @param amount amount to deposit
     * @return balance after operation
     * @throws AccountOperationException In case of negative amount
     */
    double deposit(final double amount) throws AccountOperationException;

    /**
     * Withdraws money from account. Amount should be positive
     *
     *
     * @param amount amount to withdraw
     * @return balance after operation
     * @throws AccountOperationException In case of exceeding or negative amount
     */
    double withdraw(final double amount) throws AccountOperationException;

    /**
     * Returns maximum amount available for user
     * @return max amount to withdraw
     */
    double maximumAmountToWithdraw();

    /**
     * Returns Balance. Balance can be negative
     * @return actual balance
     */
    double getBalance();
}
